<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template split_iterator</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp" title="Header &lt;boost/algorithm/string/find_iterator.hpp&gt;">
<link rel="prev" href="find_iterator.html" title="Class template find_iterator">
<link rel="next" href="make_find_iterator.html" title="Function template make_find_iterator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="find_iterator.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_find_iterator.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.algorithm.split_iterator"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template split_iterator</span></h2>
<p>boost::algorithm::split_iterator — <a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a></p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp" title="Header &lt;boost/algorithm/string/find_iterator.hpp&gt;">boost/algorithm/string/find_iterator.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> IteratorT<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a> <span class="special">:</span> <span class="keyword">public</span> iterator_facade&lt; split_iterator&lt; IteratorT &gt;, const iterator_range&lt; IteratorT &gt;, forward_traversal_tag &gt;
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="split_iterator.html#boost.algorithm.split_iteratorconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_6-bb"><span class="identifier">split_iterator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_7-bb"><span class="identifier">split_iterator</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FinderT<span class="special">&gt;</span> <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_8-bb"><span class="identifier">split_iterator</span></a><span class="special">(</span><span class="identifier">IteratorT</span><span class="special">,</span> <span class="identifier">IteratorT</span><span class="special">,</span> <span class="identifier">FinderT</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FinderT<span class="special">,</span> <span class="keyword">typename</span> RangeT<span class="special">&gt;</span> 
    <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_9-bb"><span class="identifier">split_iterator</span></a><span class="special">(</span><span class="identifier">RangeT</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">FinderT</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_5-bb">public member functions</a></span>
  <span class="keyword">bool</span> <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_5_1-bb"><span class="identifier">eof</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_10-bb">private member functions</a></span>
  <span class="keyword">const</span> <span class="identifier">match_type</span> <span class="special">&amp;</span> <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_10_1-bb"><span class="identifier">dereference</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_10_2-bb"><span class="identifier">increment</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="split_iterator.html#id-1_3_3_9_10_2_1_2_10_3-bb"><span class="identifier">equal</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.3.9.11.5.4"></a><h2>Description</h2>
<p>Split iterator encapsulates a Finder and allows for incremental searching in a string. Unlike the find iterator, split iterator iterates through gaps between matches.</p>
<p>Find iterator is a readable forward traversal iterator.</p>
<p>Dereferencing the iterator yields an iterator_range delimiting the current match. </p>
<div class="refsect2">
<a name="id-1.3.3.9.11.5.4.5"></a><h3>
<a name="boost.algorithm.split_iteratorconstruct-copy-destruct"></a><code class="computeroutput">split_iterator</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_3_9_10_2_1_2_6-bb"></a><span class="identifier">split_iterator</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Default constructor. <p>Construct null iterator. All null iterators are equal.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>eof()==true </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_3_9_10_2_1_2_7-bb"></a><span class="identifier">split_iterator</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a> <span class="special">&amp;</span> Other<span class="special">)</span><span class="special">;</span></pre>Copy constructor. <p>Construct a copy of the <code class="computeroutput"><a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a></code> </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FinderT<span class="special">&gt;</span> 
  <a name="id-1_3_3_9_10_2_1_2_8-bb"></a><span class="identifier">split_iterator</span><span class="special">(</span><span class="identifier">IteratorT</span> Begin<span class="special">,</span> <span class="identifier">IteratorT</span> End<span class="special">,</span> <span class="identifier">FinderT</span> Finder<span class="special">)</span><span class="special">;</span></pre>Constructor. <p>Construct new <code class="computeroutput"><a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a></code> for a given finder and a range. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FinderT<span class="special">,</span> <span class="keyword">typename</span> RangeT<span class="special">&gt;</span> 
  <a name="id-1_3_3_9_10_2_1_2_9-bb"></a><span class="identifier">split_iterator</span><span class="special">(</span><span class="identifier">RangeT</span> <span class="special">&amp;</span> Col<span class="special">,</span> <span class="identifier">FinderT</span> Finder<span class="special">)</span><span class="special">;</span></pre>Constructor. <p>Construct new <code class="computeroutput"><a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a></code> for a given finder and a collection. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.3.9.11.5.4.6"></a><h3>
<a name="id-1_3_3_9_10_2_1_2_5-bb"></a><code class="computeroutput">split_iterator</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id-1_3_3_9_10_2_1_2_5_1-bb"></a><span class="identifier">eof</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Eof check. <p>Check the eof condition. Eof condition means that there is nothing more to be searched i.e. <code class="computeroutput"><a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a></code> is after the last match. </p>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.3.9.11.5.4.7"></a><h3>
<a name="id-1_3_3_9_10_2_1_2_10-bb"></a><code class="computeroutput">split_iterator</code> private member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="identifier">match_type</span> <span class="special">&amp;</span> <a name="id-1_3_3_9_10_2_1_2_10_1-bb"></a><span class="identifier">dereference</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_3_9_10_2_1_2_10_2-bb"></a><span class="identifier">increment</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">bool</span> <a name="id-1_3_3_9_10_2_1_2_10_3-bb"></a><span class="identifier">equal</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="split_iterator.html" title="Class template split_iterator">split_iterator</a> <span class="special">&amp;</span> Other<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2002-2004 Pavol Droba<p>Use, modification and distribution is subject to the Boost
                Software License, Version 1.0. (See accompanying file
                <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
            </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="find_iterator.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_find_iterator.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
